Get In/Out LinksProperties

Hi All,

 

I use this code to get all the In/Out links in an object

Object o

for o in sourceMod do 
    {
            ack (NLS_(""))o.(NLS_("Object Text"))(NLS_(""))
        
        
        //for All Incoming links
        Object a = o
        
        for sLink in (a) <- "*" do 
        {
            string user = sLink."Created By"
            ack (NLS_(" "))(NLS_(user))(NLS_(" "))
        }
        
        //for all outgoing links
        for sLink in (a) -> "*" do 
        {
            string user1 = sLink."Created By"
            //ack (NLS_(user1))
            ack (NLS_(" "))(NLS_(user1))(NLS_(" "))
        }

}

 

when i loop through links. I can read the links(of type) which refers the link between the other object type.

I couldnt read the link of type external link. What am I missing here.

 

Also i would like to know the attributes of links

Eg:

Get link ID

External Link type In/Out

Link Description

Link Object Heading

Link Module

Link Baseline

Link Module Baseline

 

 

Thanks in advance. Happy weekend.

 

Best Regards,

Nabil Saleem


maknabil - Fri Nov 27 07:12:56 EST 2015

Re: Get In/Out LinksProperties
DoorsXLAustralia - Fri Nov 27 08:22:19 EST 2015

Hi Nabil,

 

You have not declared the variable sLink. DOORS will autocast this to be of type Link

To manipulate external links you need to use a variable explicitly cast to be of type ExternalLink

 

>>Also i would like to know the attributes of links

You are already accessing link attribute values in the correct way with your code

string user1 = sLink."Created By"

 

These are not standard link attributes:-

Link Description

Link Object Heading

Link Module

Link Baseline

Link Module Baseline

 

Sean

 

Re: Get In/Out LinksProperties
maknabil - Tue Dec 01 00:12:45 EST 2015

DoorsXLAustralia - Fri Nov 27 08:22:19 EST 2015

Hi Nabil,

 

You have not declared the variable sLink. DOORS will autocast this to be of type Link

To manipulate external links you need to use a variable explicitly cast to be of type ExternalLink

 

>>Also i would like to know the attributes of links

You are already accessing link attribute values in the correct way with your code

string user1 = sLink."Created By"

 

These are not standard link attributes:-

Link Description

Link Object Heading

Link Module

Link Baseline

Link Module Baseline

 

Sean

 

Sean, thanks i got the solution